#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2024/6/5 13:35
# @Author : 闫峰
# @File    : testallegroStrategyScheduler.py
from testcases.java_Intelligent_publishing.allegro.test.publish.execute_publish_strategy import ExecuteStrategy
from utils.otherutils.MyThreadPool import MyThreadPool


class TestAllegroStrategyScheduler:


    def test_main(self,strategy_id):
        # 修改 刊登店铺的额度

        # 创建策略
        # 等待
        # 执行服务自动化验证
        ExecuteStrategyCmx = ExecuteStrategy(strategy_id)
        task_list = ExecuteStrategyCmx.source_id_list
        task_list = list(map(lambda x:x[0],task_list))
        # 分渠道分发 多线程执行
        MyThreadPool(1).multithreaded(ExecuteStrategyCmx.execute_strategy_by_source_id, task_list)
        # 发送钉钉
        # 清除数据

if __name__ == '__main__':
    TestAllegroStrategyScheduler().test_main(203)